package enemyPackage;

import java.util.Random;

import javax.swing.ImageIcon;

import enemyPackage.Alien;
import enemyPackage.Bomb;

public class FaceHugger extends Alien{

	private Bomb bomb;
	protected int alien_score_value = 50;
	public final String faceHuggerpix1 = "../Image/faceHugger_alien.GIF";
	public int endX = 400;
    public int endY = 400;
    public int randX1;
    public int randX2;
    public int randY1;
    public int randY2;
    public boolean delayed = false;
    public int delayCount = 0;
    public double t = 0.0;
    public int explodeCount = 0;
    public boolean follower;

	public FaceHugger(int x, int y, int b) {
		this.x = x;
        this.y = y;
        bonus = b;
        bomb = new Bomb(x, y);
        this.health = 5;
        
        ImageIcon ii = new ImageIcon(this.getClass().getResource(this.faceHuggerpix1));
		this.setImage(ii.getImage());
	}
	
	public Bomb getBomb() {
        return bomb;
    }

    public int getScoreValue(){
    	return alien_score_value;
    }
	
	public void setUpBezier() {
    	Random generator = new Random();
		
    	if(x > 0) {
    		randX1 = generator.nextInt(x);
    	}
    	else {
    		randX1 = generator.nextInt(1);
    	}
		randX2 = generator.nextInt(endX + 300);
		if(y > 0) {
    		randY1 = generator.nextInt(y);
    	}
    	else {
    		randY1 = generator.nextInt(1);
    	}
		randY2 = generator.nextInt(endY + 300);
    }

	public int getEndX() {
		return endX;
	}

	public void setEndX(int endX) {
		this.endX = endX;
	}

	public int getEndY() {
		return endY;
	}

	public void setEndY(int endY) {
		this.endY = endY;
	}

	public int getRandX1() {
		return randX1;
	}

	public void setRandX1(int randX1) {
		this.randX1 = randX1;
	}

	public int getRandX2() {
		return randX2;
	}

	public void setRandX2(int randX2) {
		this.randX2 = randX2;
	}

	public int getRandY1() {
		return randY1;
	}

	public void setRandY1(int randY1) {
		this.randY1 = randY1;
	}

	public int getRandY2() {
		return randY2;
	}

	public void setRandY2(int randY2) {
		this.randY2 = randY2;
	}
}
